/*
 * hw.h
 *
 *  Created on: 2018-5-5
 *      Author: chenss
 */

#ifndef HW_H_
#define HW_H_

#include "main.h"


typedef enum
{
    HW_Level_Low = RESET,
    HW_Level_High = SET
}HW_Level_t;

typedef enum
{
    HW_Status_Disable = DISABLE,
    HW_Status_Enable =  ENABLE
}HW_Status_t;

typedef enum
{
    HW_Out_Led
}HW_Out_t;

typedef enum
{
    HW_In_Mode,
	HW_In_Fwd,
	HW_In_Bwd,
	HW_In_History,
	HW_In_Time,
	HW_In_Search
}HW_In_t;

void HW_Init(void);

void HW_Set(HW_Out_t out, HW_Level_t level);
void HW_Config(HW_Out_t out, HW_Status_t status);
void HW_Trigger(HW_Out_t out);
HW_Level_t HW_Get(HW_In_t in);
int HW_IsEnable(HW_In_t in);

void HW_ExtiIrs(void);

#endif /* HW_H_ */
